/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.infoweblogic.dao;

import br.com.infoweblogic.interfaces.IDisciplinaDao;
import br.com.infoweblogic.pojos.Disciplina;
import br.com.pbs.dao.GenericDao;
import br.com.pbs.exeptions.BancoExeption;

/**
 *
 * @author Luiz Segundo
 */
public class DisciplinaDao extends GenericDao<Disciplina> implements IDisciplinaDao {

        public Disciplina verifica(Disciplina valida) throws BancoExeption {
                if (valida != null) {
                        if (!valida.getNome().isEmpty()) {
                                return valida;
                        } else {
                                throw new BancoExeption("Impossivel cadastrar valores");
                        }
                } else {
                        throw new BancoExeption("Impossivel cadastrar valores");
                }

        }
}
